<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
${(name)?if_exists}
<img alt="测试" src="http://localhost/MeiYiJiaHealth/tofindfpng">
</body>
<script src="jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="ajaxfileupload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
//图片上传
function ajaxImgUpload(picUrl, param) {
    var fileName = $("#" + param).val().substring($("#" + param).val().lastIndexOf("\\") + 1);
    var fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
    ;
    if (fileType == "xls") {
        alert("请上传xls文件！");
        $("#" + param).val("");
    } else {
        $.ajaxFileUpload({
            url: picUrl, //服务器地址
            fileElementId: param, //文件的id属性
            dataType: 'text', //服务器返回的格式
            success: function (data, status) { //try语句块
                console.log(data);
            }, error: function (data, status, e) { // 相当于java中catch语句块的用法
                alert(e);
                alert("上传文件时出错，请联系管理员");
            }
        });
    }
}

function toshow(){
	$.post("miniAppUploadToOss",
            {
            }, function (data, status) {
            	console.log(data);
                if (data.code == 1) {
                	 $(data.data).each(function (i, v) {
                		 console.log(v.villageName);
                	 });
                }
            })
}
</script>
</html>